<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        for(var i=0; i<5; i++){
            if(i==2){
                //break;  //2之后整个循环中断了
                continue; // 只是本次循环中断了
            }
            alert(i);
        }
    </script>
</head>
<body>

</body>
</html>